package com.jake.rabbitbootdemo.controller;

import com.jake.rabbitbootdemo.producer.DirectProducer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("direct")
public class DirectController {

    @Autowired
    private DirectProducer directProducer;

    @RequestMapping("1")
    public void produce1(String msg) {
        directProducer.send1(msg);
    }

    @RequestMapping("2")
    public void produce2(String msg) {
        directProducer.send2(msg);
    }

    @RequestMapping("3")
    public void produce3(String msg) {
        directProducer.send3(msg);
    }

}
